package com.jiajia.study.product.dto;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jiajia.common.valid.SaveValid;
import com.jiajia.common.valid.UpdateValid;
import com.jiajia.study.product.valid.ListValue;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * 品牌
 *
 * @author zjj
 * @email zjj@qq.com
 * @date 2025-06-09 15:37:17
 */
@Data
@TableName("pms_brand")
public class BrandDTO implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 品牌id
	 */
	@TableId
	@NotNull(message = "品牌id不能为空", groups = {UpdateValid.class})
	@Null(message = "新增不能指定id",groups ={SaveValid.class})
	private Long brandId;
	/**
	 * 品牌名
	 */
	@NotBlank(message = "品牌名不能为空")
	private String name;
	/**
	 * 品牌logo地址
	 */
	private String logo;
	/**
	 * 介绍
	 */
	private String descript;
	/**
	 * 显示状态[0-不显示；1-显示]
	 */
//	@TableLogic(value = "1",delval = "0")
//	@NotNull
	@ListValue(value = {0,1},groups = {SaveValid.class,UpdateValid.class},message = "显示状态只能是0或1")
	private Integer showStatus;
	/**
	 * 检索首字母
	 */
	@NotEmpty
	private String firstLetter;
	/**
	 * 排序
	 */
	@NotNull
	@Min(0)
	private Integer sort;

}
